package com.qingmu.club.minaapi.plus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 魔力拼团运行数据
 * </p>
 *
 * @author duke
 * @since 2019-12-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class MagicGroupRun extends Model<MagicGroupRun> {

    private static final long serialVersionUID=1L;

    /**
     * 唯一ID
     */
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 拼团ID
     */
    private String groupId;

    /**
     * 团长ID
     */
    private String leaderId;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 拼团状态wait-未开始running-拼团中failure-拼团失败success-拼团成功
     */
    private String status;

    /**
     * 参与拼团人数
     */
    private Integer joinQty;

    /**
     * 长期有效0-是1-否（要与主表同步）
     */
    private Integer isAlways;

    /**
     * 开始日期(当不是长期有效1时)（要与主表同步）
     */
    private Date beginDate;

    /**
     * 结束日期(当不是长期有效1时)（要与主表同步）
     */
    private Date endDate;

    /**
     * 是否核销0-否1-是
     */
    private Integer isClose;


    public static final String ID = "id";

    public static final String GROUP_ID = "group_id";

    public static final String LEADER_ID = "leader_id";

    public static final String CREATE_TIME = "create_time";

    public static final String STATUS = "status";

    public static final String JOIN_QTY = "join_qty";

    public static final String IS_ALWAYS = "is_always";

    public static final String BEGIN_DATE = "begin_date";

    public static final String END_DATE = "end_date";

    public static final String IS_CLOSE = "is_close";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
